import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;


    /*public static void main(String[] args) throws InterruptedException {
         Thread t1 = new Thread(){
            @Override
            public void run() {
                System.out.println("hello thread");
            }
        };
        t1.sleep(1000);
    }*/
    /*  public static void main(String[] args) {
        Callable<Integer> callable = new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                int sum = 0;
                for (int i = 0; i <=10000 ; i++) {
                    sum+=i;
                }
                return  sum;
            }
        };

        FutureTask <Integer> futureTask = new FutureTask<>(callable);
        Thread t = new Thread(futureTask);
        t.start();
          try {
              System.out.println(futureTask.get());
          } catch (InterruptedException e) {
              throw new RuntimeException(e);
          } catch (ExecutionException e) {
              throw new RuntimeException(e);
          }
      }*/

/*
class Student{
    public  int age;
    public  String name;
    public  static String classroom="109";

    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }

}*/

/*class OuterClass{
    public int data1 = 1;
    static class InnerClass{
        public int data2 =2;
    }
}

public class Test {
    public static void main(String[] args) {
        OuterClass outerClass =new OuterClass();
        System.out.println(outerClass.data1);
        OuterClass.InnerClass in = new OuterClass.InnerClass();
        System.out.println(in.data2);
    }
}*/
/*
interface  A{
    void test();
}

public class Test {
    public static void main(String[] args) {
        int n = 100;
        A a = new A() {
            @Override
            public void test() {
                System.out.println("匿名内部类"+n);
            }
        };
        a.test();
    }
}
*/






